package com.jieyang.oa.service.impl;

import com.jieyang.oa.dao.DeptDao;
import com.jieyang.oa.pojo.entity.Dept;
import com.jieyang.oa.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 29276
 * @version 1.0
 * @description: TODO
 * @date 2021/8/15 10:45
 */
@Service
@Transactional
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptDao deptDao;
    @Override
    public Integer insert(Dept dept) {
        return deptDao.insert(dept);
    }

    public List<Dept> selectList() {
        return deptDao.selectList();
    }

    public Integer delete(Integer deptNo) {
        return deptDao.delete(deptNo);
    }

    @Override
    public Dept selectByDeptNo(Integer deptNo) {
        return deptDao.selectByDeptNo(deptNo);
    }

    @Override
    public Integer update(Dept dept) {
        return deptDao.update(dept);
    }
}
